#ifndef _RADIAN_RESOURCE_BROWER_H
#define _RADIAN_RESOURCE_BROWER_H

#include "ui_RadianResourceBrowser.h"
#include "RadianCommon.h"
class RadianResourceBrowser: public QMainWindow  ,public Ui::RadianResourceBrowser
{
	enum EitorResourceTypes
	{
		ALL = 0,
		Model = 1,
		Material = 2,
		Advanced = 3,
		Light = 4
	};

	Q_OBJECT
public:
	RadianResourceBrowser();
	~RadianResourceBrowser();
	
	bool ReadDir();
	QTreeWidget * GetResourceTree() { return resourceTree; }
protected:
	void closeEvent(QCloseEvent *event);
	bool addTreeItem(QString &dir, QTreeWidgetItem * current);
	protected slots:
	void OnTabindexChanged();
	void OnTreeItemClicked();
	void BrowserMaterial(const QString &OrigenName);
	void BrowserModel(const QString &OrigenName);

	void loadAllResource();
	void loadLightResource(QTreeWidgetItem * lightItem);
	void loadMaterialResource(QTreeWidgetItem * materialItem);
	void loadModelResource(QTreeWidgetItem * modelItem);	
};

#endif